<html>
<head><meta charset="utf-8"><title>rust-analyzer#775 · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html">rust-analyzer#775</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="161237309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161237309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161237309">(Mar 20 2019 at 11:35)</a>:</h4>
<p>What is the status of <a href="https://github.com/rust-lang/rust/issues/775" target="_blank" title="https://github.com/rust-lang/rust/issues/775">#775</a>? Should EOL be converted or preserved?</p>



<a name="161239320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161239320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161239320">(Mar 20 2019 at 12:03)</a>:</h4>
<p><span class="user-mention" data-user-id="211466">@Caio</span> it needs design and implementation. I am not actually sure that the proposed solution is a good one, but it seems nice</p>



<a name="161239364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161239364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161239364">(Mar 20 2019 at 12:03)</a>:</h4>
<p>Basically, we make it an invariant that any strings inside <code>rust-analyzer</code> use <code>\n</code> as a line separator, and that any transcoding happens at the boundary</p>



<a name="161239376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161239376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161239376">(Mar 20 2019 at 12:03)</a>:</h4>
<p>sort-of how python's text mode works</p>



<a name="161239476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161239476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161239476">(Mar 20 2019 at 12:04)</a>:</h4>
<p>I guess the next step is to write some experimental impl which tries to convert line-endings at the lsp boundary</p>



<a name="161239611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161239611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161239611">(Mar 20 2019 at 12:06)</a>:</h4>
<p>Changes in one direciton (text going from editor into analyzer) should be handled here: <a href="https://github.com/rust-analyzer/rust-analyzer/blob/69ee5c9c5ef212f7911028c9ddf581559e6565c3/crates/ra_lsp_server/src/server_world.rs#L103" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/69ee5c9c5ef212f7911028c9ddf581559e6565c3/crates/ra_lsp_server/src/server_world.rs#L103">https://github.com/rust-analyzer/rust-analyzer/blob/69ee5c9c5ef212f7911028c9ddf581559e6565c3/crates/ra_lsp_server/src/server_world.rs#L103</a></p>



<a name="161303270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161303270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161303270">(Mar 21 2019 at 00:02)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> Thanks! I guess it is going to take a while since I am still learning how rust-analyzer works</p>



<a name="161428923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161428923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161428923">(Mar 22 2019 at 08:23)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> I suppose you're already aware, but there's a grammar WG which already has a parser and grammar for Rust that may be interesting to consider for r-a. <span class="user-mention" data-user-id="126931">@centril</span> and <span class="user-mention" data-user-id="119009">@eddyb</span> are part of the group</p>



<a name="161429237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161429237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161429237">(Mar 22 2019 at 08:28)</a>:</h4>
<p>I am aware of that, yeah. The plan is to fuzz ra parser against the grammar, once that is ready. </p>
<p>We probably won't be able to reuse grammar/parser as is: we must deal with incomplete code well, and we need to be able to produce concrete syntax trees. We definitely should align the names of various types though!</p>



<a name="161429703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23775/near/161429703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23775.html#161429703">(Mar 22 2019 at 08:37)</a>:</h4>
<p>Fantastic, I just wanted to make sure that you were aware of each other's work :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>